<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        h1{
            color: red;  /*直接写颜色单词*/
            color: #ff0000;  /*通过6位16进制去写*/
            color: #f00;
            color: rgb(255,0,0);
            color: rgba(255,0,0,0.5);
        }
       #d2{
           width: 200px;
           height: 200px;
           border: 1px solid red;
           background-color: pink;
           /*设置背景图片*/
          background-image: url("../b.jpg");
           /*设置背景图片尺寸*/
           background-size:100px 100px;
           /*禁止重复*/
           background-repeat: no-repeat;
           /*控制位置 横向 纵向*/
           background-position: 70px ;
          /* background-position: 50% 20%;, 按照百分比设置位置*/
       }
       #d1{
                 width: 611px;
           height: 376px;
           background-color: #e8e8e8;
           background-image: url("http://doc.canglaoshi.org/tstore_v1/images/itemCat/study_computer_img1.png");
           background-repeat: no-repeat;
           background-position: 90% 90%;
           background-size: 318px 319px;

       }
    </style>
</head>
<body>
<div></div>
<div id="d1">

</div>
<h1 id="d2">颜色测试</h1>
</body>
</html>